Every HTML tag is represented by a JavaScript object. Tags are organized in a tree hierarchy, where tag x
is a parent of tag y
if y
falls completely within x
's opening and closing tags (<x>x content surrounding <y>y content</y></x>
). The following table lists the properties and methods of tag objects in Dreamweaver, along with their return values (with explanations, where appropriate). A bullet (·) marks read-only properties.
Property or method | Return value and explanation |
---|---|
|
|
|
The parent tag. If this is the HTML tag, then the document object is returned instead. |
|
A |
|
The HTML name for the tag, such as |
|
A string containing the value of the specified tag attribute. |
|
The HTML source contained between the begin tag and the end tag. For example, in the code |
|
The HTML source for this tag, including the tag itself. For the example code above, |
|
The value of the specified attribute if it is explicitly specified; otherwise, |
|
The translated value of the specified attribute, or the same value tha would be returned by |
|
No return value. Sets the specified attribute to the specified value: for example, |
|
No return value. Removes the specified attribute and its value from the HTML for this tag. |
|
A If the If the |
|
A Boolean value indicating whether the tag has any children. |
|
A Boolean value indicating whether the tag has any translated attributes. (This property is not included in DOM Level 1; it was added to Dreamweaver 3 to support attribute translation.) |